package facadePattern;

import facadePattern.subsystem.Charge;
import facadePattern.subsystem.CheckWord;
import facadePattern.subsystem.TypeSetting;

public class ClientServerFacade {
    private CheckWord checkWord;
    private Charge charge;
    private TypeSetting typeSetting;
    String advertisement;

    public ClientServerFacade(String advertisement) {
        this.advertisement = advertisement;
        checkWord  = new CheckWord(advertisement);
        charge = new Charge(checkWord);
        typeSetting = new TypeSetting(advertisement);
    }

    public void doAdvvertisement(){
        checkWord.setChargeAmount();
        charge.giveCharge();
        typeSetting.typeSeting();
    }
    public static void main(String[] args){
        ClientServerFacade c = new ClientServerFacade("外观类测试");
        c.doAdvvertisement();
    }
}

